home *** CD-ROM | disk | FTP | other *** search
/ Clickx 115 / Clickx 115.iso / software / tools / windows / tails-i386-0.16.iso / live / filesystem.squashfs / usr / share / uim / mana-custom.scm < prev    next >
Encoding:
Text File  |  2010-11-07  |  8.6 KB  |  305 lines

  1. ;;; mana-custom.scm: Customization variables for mana.scm
  2. ;;;
  3. ;;; Copyright (c) 2003-2009 uim Project http://code.google.com/p/uim/
  4. ;;;
  5. ;;; All rights reserved.
  6. ;;;
  7. ;;; Redistribution and use in source and binary forms, with or without
  8. ;;; modification, are permitted provided that the following conditions
  9. ;;; are met:
  10. ;;; 1. Redistributions of source code must retain the above copyright
  11. ;;;    notice, this list of conditions and the following disclaimer.
  12. ;;; 2. Redistributions in binary form must reproduce the above copyright
  13. ;;;    notice, this list of conditions and the following disclaimer in the
  14. ;;;    documentation and/or other materials provided with the distribution.
  15. ;;; 3. Neither the name of authors nor the names of its contributors
  16. ;;;    may be used to endorse or promote products derived from this software
  17. ;;;    without specific prior written permission.
  18. ;;;
  19. ;;; THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS'' AND
  20. ;;; ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  21. ;;; IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  22. ;;; ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE
  23. ;;; FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  24. ;;; DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  25. ;;; OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  26. ;;; HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  27. ;;; LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  28. ;;; OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  29. ;;; SUCH DAMAGE.
  30. ;;;;
  31.  
  32. (require "i18n.scm")
  33.  
  34.  
  35. (define mana-im-name-label (N_ "Mana"))
  36. (define mana-im-short-desc (N_ "A multi-segment kana-kanji conversion engine"))
  37.  
  38. (define-custom-group 'mana
  39.                      mana-im-name-label
  40.                      mana-im-short-desc)
  41.  
  42. (define-custom-group 'mana-advanced
  43.                      (N_ "Mana (advanced)")
  44.                      (N_ "Advanced settings for Mana"))
  45.  
  46. ;;
  47. ;; segment separator
  48. ;;
  49.  
  50. (define-custom 'mana-show-segment-separator? #f
  51.   '(mana segment-sep)
  52.   '(boolean)
  53.   (N_ "Show segment separator")
  54.   (N_ "long description will be here."))
  55.  
  56. (define-custom 'mana-segment-separator "|"
  57.   '(mana segment-sep)
  58.   '(string ".*")
  59.   (N_ "Segment separator")
  60.   (N_ "long description will be here."))
  61.  
  62. (custom-add-hook 'mana-segment-separator
  63.          'custom-activity-hooks
  64.          (lambda ()
  65.            mana-show-segment-separator?))
  66.  
  67. ;;
  68. ;; candidate window
  69. ;;
  70.  
  71. (define-custom 'mana-use-candidate-window? #t
  72.   '(mana candwin)
  73.   '(boolean)
  74.   (N_ "Use candidate window")
  75.   (N_ "long description will be here."))
  76.  
  77. (define-custom 'mana-candidate-op-count 1
  78.   '(mana candwin)
  79.   '(integer 0 99)
  80.   (N_ "Conversion key press count to show candidate window")
  81.   (N_ "long description will be here."))
  82.  
  83. (define-custom 'mana-nr-candidate-max 10
  84.   '(mana candwin)
  85.   '(integer 1 20)
  86.   (N_ "Number of candidates in candidate window at a time")
  87.   (N_ "long description will be here."))
  88.  
  89. (define-custom 'mana-select-candidate-by-numeral-key? #f
  90.   '(mana candwin)
  91.   '(boolean)
  92.   (N_ "Select candidate by numeral keys")
  93.   (N_ "long description will be here."))
  94.  
  95. ;; activity dependency
  96. (custom-add-hook 'mana-candidate-op-count
  97.          'custom-activity-hooks
  98.          (lambda ()
  99.            mana-use-candidate-window?))
  100.  
  101. (custom-add-hook 'mana-nr-candidate-max
  102.          'custom-activity-hooks
  103.          (lambda ()
  104.            mana-use-candidate-window?))
  105.  
  106. (custom-add-hook 'mana-select-candidate-by-numeral-key?
  107.          'custom-activity-hooks
  108.          (lambda ()
  109.            mana-use-candidate-window?))
  110.  
  111. ;;
  112. ;; toolbar
  113. ;;
  114.  
  115. ;; Can't be unified with action definitions in mana.scm until uim
  116. ;; 0.4.6.
  117. (define mana-input-mode-indication-alist
  118.   (list
  119.    (list 'action_mana_direct
  120.      'ja_direct
  121.      "-"
  122.      (N_ "Direct input")
  123.      (N_ "Direct input mode"))
  124.    (list 'action_mana_hiragana
  125.      'ja_hiragana
  126.      "ñó"
  127.      (N_ "Hiragana")
  128.      (N_ "Hiragana input mode"))
  129.    (list 'action_mana_katakana
  130.      'ja_katakana
  131.      "Ñó"
  132.      (N_ "Katakana")
  133.      (N_ "Katakana input mode"))
  134.    (list 'action_mana_halfkana
  135.      'ja_halfkana
  136.      "Ä▒"
  137.      (N_ "Halfwidth Katakana")
  138.      (N_ "Halfwidth Katakana input mode"))
  139.    (list 'action_mana_halfwidth_alnum
  140.      'ja_halfwidth_alnum
  141.      "aA"
  142.      (N_ "Halfwidth Alphanumeric")
  143.      (N_ "Halfwidth Alphanumeric input mode"))
  144.    (list 'action_mana_fullwidth_alnum
  145.      'ja_fullwidth_alnum
  146.      "ú┴"
  147.      (N_ "Fullwidth Alphanumeric")
  148.      (N_ "Fullwidth Alphanumeric input mode"))))
  149.  
  150. (define mana-kana-input-method-indication-alist
  151.   (list
  152.    (list 'action_mana_roma
  153.      'ja_romaji
  154.      "ú╥"
  155.      (N_ "Romaji")
  156.      (N_ "Romaji input mode"))
  157.    (list 'action_mana_kana
  158.      'ja_kana
  159.      "ñ½"
  160.      (N_ "Kana")
  161.      (N_ "Kana input mode"))
  162.    (list 'action_mana_azik
  163.      'ja_azik
  164.      "ú┌"
  165.      (N_ "AZIK")
  166.      (N_ "AZIK extended romaji input mode"))))
  167.  
  168. ;;; Buttons
  169.  
  170. (define-custom 'mana-widgets '(widget_mana_input_mode
  171.                 widget_mana_kana_input_method)
  172.   '(mana toolbar)
  173.   (list 'ordered-list
  174.     (list 'widget_mana_input_mode
  175.           (N_ "Input mode")
  176.           (N_ "Input mode"))
  177.     (list 'widget_mana_kana_input_method
  178.           (N_ "Kana input method")
  179.           (N_ "Kana input method")))
  180.   (N_ "Enabled toolbar buttons")
  181.   (N_ "long description will be here."))
  182.  
  183. ;; dynamic reconfiguration
  184. ;; mana-configure-widgets is not defined at this point. So wrapping
  185. ;; into lambda.
  186. (custom-add-hook 'mana-widgets
  187.          'custom-set-hooks
  188.          (lambda ()
  189.            (mana-configure-widgets)))
  190.  
  191.  
  192. ;;; Input mode
  193.  
  194. (define-custom 'default-widget_mana_input_mode 'action_mana_direct
  195.   '(mana toolbar)
  196.   (cons 'choice
  197.     (map indication-alist-entry-extract-choice
  198.          mana-input-mode-indication-alist))
  199.   (N_ "Default input mode")
  200.   (N_ "long description will be here."))
  201.  
  202. (define-custom 'mana-input-mode-actions
  203.                (map car mana-input-mode-indication-alist)
  204.   '(mana toolbar)
  205.   (cons 'ordered-list
  206.     (map indication-alist-entry-extract-choice
  207.          mana-input-mode-indication-alist))
  208.   (N_ "Input mode menu items")
  209.   (N_ "long description will be here."))
  210.  
  211. ;; value dependency
  212. (if custom-full-featured?
  213.     (custom-add-hook 'mana-input-mode-actions
  214.              'custom-set-hooks
  215.              (lambda ()
  216.                (custom-choice-range-reflect-olist-val
  217.             'default-widget_mana_input_mode
  218.             'mana-input-mode-actions
  219.             mana-input-mode-indication-alist))))
  220.  
  221. ;; activity dependency
  222. (custom-add-hook 'default-widget_mana_input_mode
  223.          'custom-activity-hooks
  224.          (lambda ()
  225.            (memq 'widget_mana_input_mode mana-widgets)))
  226.  
  227. (custom-add-hook 'mana-input-mode-actions
  228.          'custom-activity-hooks
  229.          (lambda ()
  230.            (memq 'widget_mana_input_mode mana-widgets)))
  231.  
  232. ;; dynamic reconfiguration
  233. (custom-add-hook 'default-widget_mana_input_mode
  234.          'custom-set-hooks
  235.          (lambda ()
  236.            (mana-configure-widgets)))
  237.  
  238. (custom-add-hook 'mana-input-mode-actions
  239.          'custom-set-hooks
  240.          (lambda ()
  241.            (mana-configure-widgets)))
  242.  
  243. ;;; Kana input method
  244.  
  245. (define-custom 'default-widget_mana_kana_input_method 'action_mana_roma
  246.   '(mana toolbar)
  247.   (cons 'choice
  248.     (map indication-alist-entry-extract-choice
  249.          mana-kana-input-method-indication-alist))
  250.   (N_ "Default kana input method")
  251.   (N_ "long description will be here."))
  252.  
  253. (define-custom 'mana-kana-input-method-actions
  254.                (map car mana-kana-input-method-indication-alist)
  255.   '(mana toolbar)
  256.   (cons 'ordered-list
  257.     (map indication-alist-entry-extract-choice
  258.          mana-kana-input-method-indication-alist))
  259.   (N_ "Kana input method menu items")
  260.   (N_ "long description will be here."))
  261.  
  262. ;; value dependency
  263. (if custom-full-featured?
  264.     (custom-add-hook 'mana-kana-input-method-actions
  265.              'custom-set-hooks
  266.              (lambda ()
  267.                (custom-choice-range-reflect-olist-val
  268.             'default-widget_mana_kana_input_method
  269.             'mana-kana-input-method-actions
  270.             mana-kana-input-method-indication-alist))))
  271.  
  272. ;; activity dependency
  273. (custom-add-hook 'default-widget_mana_kana_input_method
  274.          'custom-activity-hooks
  275.          (lambda ()
  276.            (memq 'widget_mana_kana_input_method mana-widgets)))
  277.  
  278. (custom-add-hook 'mana-kana-input-method-actions
  279.          'custom-activity-hooks
  280.          (lambda ()
  281.            (memq 'widget_mana_kana_input_method mana-widgets)))
  282.  
  283. ;; dynamic reconfiguration
  284. (custom-add-hook 'default-widget_mana_kana_input_method
  285.          'custom-set-hooks
  286.          (lambda ()
  287.            (mana-configure-widgets)))
  288.  
  289. (custom-add-hook 'mana-kana-input-method-actions
  290.          'custom-set-hooks
  291.          (lambda ()
  292.            (mana-configure-widgets)))
  293.  
  294. (define-custom 'mana-use-with-vi? #f
  295.   '(mana-advanced special-op)
  296.   '(boolean)
  297.   (N_ "Enable vi-cooperative mode")
  298.   (N_ "long description will be here."))
  299.  
  300. (define-custom 'mana-use-mode-transition-keys-in-off-mode? #f
  301.   '(mana-advanced mode-transition)
  302.   '(boolean)
  303.   (N_ "Enable input mode transition keys in direct (off state) input mode")
  304.   (N_ "long description will be here."))
  305.